package cn.edu.ustc.xrovers.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table
public class Analyst {

	
	private Integer id;
	private String analystId;
	private String password;
	private String name;
	private String tel;
	private Set<Parameter> parameters=new HashSet<Parameter>();
	private Set<Evaluating> evaluatings=new HashSet<Evaluating>();
	
	@Column(name="Ana_ID")
	public String getAnalystId() {
		return analystId;
	}
	@OneToMany(mappedBy="analyst")
	public Set<Evaluating> getEvaluatings() {
		return evaluatings;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	@Column(name="Ana_Name")
	public String getName() {
		return name;
	}
	@OneToMany(mappedBy="analyst")
	public Set<Parameter> getParameters() {
		return parameters;
	}
	@Column(name="Ana_Password")
	public String getPassword() {
		return password;
	}
	@Column(name="Ana_Tel")
	public String getTel() {
		return tel;
	}
	
	
	/*set方法*/
	public void setAnalystId(String analystId) {
		this.analystId = analystId;
	}
	public void setEvaluatings(Set<Evaluating> evaluatings) {
		this.evaluatings = evaluatings;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setParameters(Set<Parameter> parameters) {
		this.parameters = parameters;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
}
